package com.jeethink.gs.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeethink.common.annotation.Excel;

import java.util.Date;

/**
 * @ClassName GsTaskDTO1
 * @Description TODO
 * @Author Hyunjin
 * @Date 2022-08-08  11:52
 * @Version 1.0
 **/
public class GsTaskDTO1 {
    private String no;

    /** 唯一编号 */
    private String id;

    /** 任务名称 */
    @Excel(name = "任务名称")
    private String taskName;

    /** 报表名称 */
    @Excel(name = "报表名称")
    private String reportFormName;

    /** (任务时限)开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "(任务时限)开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date taskStartTime;

    /** (任务时限)结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "(任务时限)结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date taskEndTime;

    /** 任务类型(关联sys_dict_data表的value,type等于task_type) */
    @Excel(name = "任务类型(关联sys_dict_data表的value,type等于task_type)")
    private String taskType;

    /** 审核方式(0:无需审核 1:填饱公司领导审核) */
    @Excel(name = "审核方式(0:无需审核 1:填饱公司领导审核)")
    private String auditMethod;

    /** 任务状态(0:待发布 1:已发布 2:待填报 3:已过期 4：待审核 5：审核驳回 6：已提交) */
    @Excel(name = "任务状态(0:待发布 1:已发布 2:待填报 3:已过期 4：待审核 5：审核驳回 6：已提交)")
    private String taskState;

    //任务附件
    private String[] enclosure;

    //任务执行人
    private String[] executor;


    public String[] getEnclosure() {
        return enclosure;
    }

    public void setEnclosure(String[] enclosure) {
        this.enclosure = enclosure;
    }

    public String[] getExecutor() {
        return executor;
    }

    public void setExecutor(String[] executor) {
        this.executor = executor;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getReportFormName() {
        return reportFormName;
    }

    public void setReportFormName(String reportFormName) {
        this.reportFormName = reportFormName;
    }

    public Date getTaskStartTime() {
        return taskStartTime;
    }

    public void setTaskStartTime(Date taskStartTime) {
        this.taskStartTime = taskStartTime;
    }

    public Date getTaskEndTime() {
        return taskEndTime;
    }

    public void setTaskEndTime(Date taskEndTime) {
        this.taskEndTime = taskEndTime;
    }

    public String getTaskType() {
        return taskType;
    }

    public void setTaskType(String taskType) {
        this.taskType = taskType;
    }

    public String getAuditMethod() {
        return auditMethod;
    }

    public void setAuditMethod(String auditMethod) {
        if(auditMethod.equals("0")){
            this.auditMethod = "无需审核";
        }else if(auditMethod.equals("1")){
            this.auditMethod = "申报公司领导审核";
        }else{
            this.auditMethod = auditMethod;
        }
    }

    public String getTaskState() {
        return taskState;
    }

    public void setTaskState(String taskState) {
        if(taskState.equals("0")){
            this.taskState = "待发布";
        }else if(taskState.equals("1")){
            this.taskState = "已发布";
        }else if(taskState.equals("2")){
            this.taskState = "待填报";
        }else if(taskState.equals("3")){
            this.taskState = "已过期";
        }else if(taskState.equals("4")){
            this.taskState = "待审核";
        }else if(taskState.equals("5")){
            this.taskState = "审核驳回";
        }else if(taskState.equals("6")){
            this.taskState = "已提交";
        }
        else{
            this.taskState = taskState;
        }

    }


}
